home *** CD-ROM | disk | FTP | other *** search
/ AmigActive 24 / AACD 24.iso / AACD / Online / Epic4 / share / epic / help / 6_functions / leftw < prev    next >
Text File  |  2001-03-21  |  955b  |  28 lines

  1. Synopsis:
  2.    $leftw(<count> <word list>)
  3.    $rightw(<count> <word list>)
  4.  
  5. Technical:
  6.    These functions are used to return a slice of the input list, from either
  7.    the beginning or end of the list.  It returns the indicated number of
  8.    words from the beginning or the end of the list.
  9.  
  10. Practical:
  11.    This is mostly useful when you know you always want to get a certain
  12.    number of starting or ending words in a list, regardless of what they
  13.    are.  They are analogous to $left() and $right(), except they operate on
  14.    whole words instead of characters.
  15.  
  16. Returns:
  17.    list of words from beginning or end of word list
  18.  
  19. Examples:
  20.    $leftw(2 hello there how are you?)         returns "hello there"
  21.    $leftw(-1 hello there bob)                 returns nothing
  22.    $leftw(7 hello there bob)                  returns "hello there bob"
  23.    $rightw(2 hello there how are you?)        returns "are you?"
  24.  
  25. See Also:
  26.    midw(6); restw(6)
  27.  
  28.